package com.guessdroid.labeling;

public class GContext implements java.io.Serializable{
	
	private static final long serialVersionUID = -6952588391489011736L;
	public String label;
	public int id;
	public int correctCount;
	public int wrongCount;
	
	public GContext(String name, int id){
		label = name;
		this.id= id;
		correctCount = 0;
		wrongCount = 0;
	}
	
	public String successPercent(){
		int total = correctCount + wrongCount;
		if (total==0)
			return "0";
		int percent = (int) Math.round((double)correctCount/(double)total *100 );
		return Integer.toString(percent);
	}
	
	public void correct(){
		this.correctCount ++;
	}
	
	public void wrong(){
		this.wrongCount ++;
	}
}
